import React from 'react';
import {Input, Button} from 'antd';
import './Search.scss';

const {Search} = Input;

function mySearch(props) {
  return (
    <div className="SearchBox">
      <Search
        placeholder="请输入物料编码..."
        value={props.value}
        onChange={e => props.change(e.target.value)}
        onSearch={props.search}
        style={{width: 200}}
      />
      <Button onClick={props.clear}>清除搜索</Button>
    </div>
  );
}

export default mySearch;
